#include<stdio.h>
#include<stdlib.h>


#define N 10
#define M 20

int *arroc_array(int n);
int main(void)
{
	int *arr;
	arr = arroc_array(N);
	for(int i = 0; i < N; i++){
		arr[i] = i + 1;
		printf("%d ", arr[i]);
	}
	printf("\n");
	arr = realloc(arr, M * sizeof(int));
	for(int i = 0; i < M; i++){
		arr[i] = i + 1;
		printf("%d ", arr[i]);
	}
	printf("%d", arr[i]);
	printf("\n");
	free(arr);

	arr = NULL;


	return 0;
}

int *arroc_array(int n){
	int *p;
	p = (int *)malloc(n * sizeof(int));
	return p;
}


